#version 130

out vec2 vTexCoord;

uniform float ratio = 0.2;
uniform int index = 0;

void main(void)
{
   vec2 P = sign( gl_Vertex.xy );
   vTexCoord = P * 0.5 + 0.5;
   
   vec2 screenCoord = vec2(-1 + ratio + (index*2 + P.x) * ratio, 
      1 - ratio + P.y * ratio);
   gl_Position = vec4( screenCoord, 0.0, 1.0 );
}